/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:48 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class ThongtinbaikiemtraEntity
    {
        public ThongtinbaikiemtraEntity()
        {
			m_pk_ithongtinbaikiemtraid=0;
			m_fk_ihocvienid=0;
			m_fk_ikiemtraid=0;
			m_fdiem=0;
			m_itrangthai=0;
			m_dthoigiannopbai=DateTime.Now;
			m_snhanxet="";
			m_fk_igiangvienchambaiid=0;
        }
		private Int64 m_pk_ithongtinbaikiemtraid;
		public Int64 PK_iThongtinbaikiemtraID
		{
			get { return m_pk_ithongtinbaikiemtraid ; }
			set { m_pk_ithongtinbaikiemtraid = value; }
		}
		private Int64 m_fk_ihocvienid;
		public Int64 FK_iHocvienID
		{
			get { return m_fk_ihocvienid ; }
			set { m_fk_ihocvienid = value; }
		}
		private Int64 m_fk_ikiemtraid;
		public Int64 FK_iKiemtraID
		{
			get { return m_fk_ikiemtraid ; }
			set { m_fk_ikiemtraid = value; }
		}
		private float m_fdiem;
		public float fDiem
		{
			get { return m_fdiem ; }
			set { m_fdiem = value; }
		}
		private Int16 m_itrangthai;
		public Int16 iTrangthai
		{
			get { return m_itrangthai ; }
			set { m_itrangthai = value; }
		}
		private DateTime m_dthoigiannopbai;
		public DateTime dThoigiannopbai
		{
			get { return m_dthoigiannopbai ; }
			set { m_dthoigiannopbai = value; }
		}
		private String m_snhanxet;
		public String sNhanxet
		{
			get { return m_snhanxet ; }
			set { m_snhanxet = value; }
		}
		private Int64 m_fk_igiangvienchambaiid;
		public Int64 FK_iGiangvienchambaiID
		{
			get { return m_fk_igiangvienchambaiid ; }
			set { m_fk_igiangvienchambaiid = value; }
		}

        #region Comparison
        public static List<ThongtinbaikiemtraEntity> Sort(List<ThongtinbaikiemtraEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(ThongtinbaikiemtraEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<ThongtinbaikiemtraEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<ThongtinbaikiemtraEntity> COMPARISON_PK_iThongtinbaikiemtraID
		{
			get
			{
				return delegate(ThongtinbaikiemtraEntity entity,ThongtinbaikiemtraEntity other)
				{
					return entity.PK_iThongtinbaikiemtraID.CompareTo(other.PK_iThongtinbaikiemtraID);
				};
			}
		}
		public static Comparison<ThongtinbaikiemtraEntity> COMPARISON_FK_iHocvienID
		{
			get
			{
				return delegate(ThongtinbaikiemtraEntity entity,ThongtinbaikiemtraEntity other)
				{
					return entity.FK_iHocvienID.CompareTo(other.FK_iHocvienID);
				};
			}
		}
		public static Comparison<ThongtinbaikiemtraEntity> COMPARISON_FK_iKiemtraID
		{
			get
			{
				return delegate(ThongtinbaikiemtraEntity entity,ThongtinbaikiemtraEntity other)
				{
					return entity.FK_iKiemtraID.CompareTo(other.FK_iKiemtraID);
				};
			}
		}
		public static Comparison<ThongtinbaikiemtraEntity> COMPARISON_iDiem
		{
			get
			{
				return delegate(ThongtinbaikiemtraEntity entity,ThongtinbaikiemtraEntity other)
				{
					return entity.fDiem.CompareTo(other.fDiem);
				};
			}
		}
		public static Comparison<ThongtinbaikiemtraEntity> COMPARISON_iTrangthai
		{
			get
			{
				return delegate(ThongtinbaikiemtraEntity entity,ThongtinbaikiemtraEntity other)
				{
					return entity.iTrangthai.CompareTo(other.iTrangthai);
				};
			}
		}
		public static Comparison<ThongtinbaikiemtraEntity> COMPARISON_dThoigiannopbai
		{
			get
			{
				return delegate(ThongtinbaikiemtraEntity entity,ThongtinbaikiemtraEntity other)
				{
					return entity.dThoigiannopbai.CompareTo(other.dThoigiannopbai);
				};
			}
		}
		public static Comparison<ThongtinbaikiemtraEntity> COMPARISON_sNhanxet
		{
			get
			{
				return delegate(ThongtinbaikiemtraEntity entity,ThongtinbaikiemtraEntity other)
				{
					return entity.sNhanxet.CompareTo(other.sNhanxet);
				};
			}
		}
		public static Comparison<ThongtinbaikiemtraEntity> COMPARISON_FK_iGiangvienchambaiID
		{
			get
			{
				return delegate(ThongtinbaikiemtraEntity entity,ThongtinbaikiemtraEntity other)
				{
					return entity.FK_iGiangvienchambaiID.CompareTo(other.FK_iGiangvienchambaiID);
				};
			}
		}
        #endregion
    }
}
